console.log(process.env.NODE_ENV);
const path = require('path')
function resolve(dir) {
    return path.join(__dirname,dir)
}
module.exports = {
  // lintOnSave:false
  devServer: {
    port: 9000,
    open: true,
    overlay: {
      warnings: false,
      errors: true,
    },
    proxy: {
      "/api": {
        target: "<url>",
        ws: true,
        changeOrigin: true,
      },
      [process.env.VUE_APP_BASE_API]: {
        target: "http://localhost:9000",
        changeOrigin: true,
        pathRewrite:{
            [process.env.VUE_APP_BASE_API]:''
        }
      },
    },
  },

  configureWebpack:{
      name:'project',
      resolve:{
          alias:{
              '@':resolve('src'),
              'views':resolve('src/views'),
              'components':resolve('src/components'),
              'utils':resolve('src/utils'),
              'style':resolve('src/style'),
          }
      }
  }
};
